#include "../src/parser/sql_parser.h"
#include <stdio.h>
#include <stdlib.h>

int main() {
    printf("Simple Parser Test\n");
    printf("==================\n");
    
    const char* query = "SELECT name LIMIT 10";
    printf("Testing: %s\n", query);
    
    parser_t* parser = parser_create(query);
    if (!parser) {
        printf("Failed to create parser\n");
        return 1;
    }
    
    printf("Parser created successfully\n");
    
    // Just check if we can get the first token
    if (parser->current_token) {
        printf("First token: %d, value: %s\n", 
               parser->current_token->type, 
               parser->current_token->value ? parser->current_token->value : "NULL");
    } else {
        printf("No current token\n");
    }
    
    parser_destroy(parser);
    printf("Test completed\n");
    return 0;
}